class F {
    constructor(name,age){  //相当与init方法
        this.name = name;
        this.age = age;

    }

    getName(){   //相当于实例方法

        console.log(this.age)
    }

    static getAge(){
        console.log("还有谁");
    }


}

class FSon extends F{

    constructor(name,age,sex){
        super(name,age);
        this.sex = sex;
    }


    hehe(){

        console.log("妈的还有谁");
    }

}





var f1 = new F("xingweixin",27);
var f2 = new F("fengmengyue",26);

f1.getName();
f2.getName();

F.getAge()


var s = new FSon("xiaoxinxin",6,"girl");

s.hehe();
s.getName();

